import React, { memo } from 'react'
import styles from '../index.module.scss'
export default memo(
    function News({ newsData = [], baseURL }) {
        return (
            <div className={styles.news}>
                <h3 className={styles.news_title}>最新资讯</h3>
                <div className={styles.news_main}>
                    {
                        newsData.map(v => {
                            return <div className={styles.news_item} key={v.id}>
                                <img className={styles.news_item.img} src={baseURL + v.imgSrc} alt="" />
                                <div className={styles.news_item_info}>
                                    <h4>{v.title}</h4>
                                    <p><span>{v.from}</span><span>{v.date}</span></p>
                                </div>
                            </div>
                        })
                    }
                </div>
            </div>
        )
    }

)